home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Leonardo the Inventor
/
Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso
/
LEOWINMV
/
SHARED.DIR
/
03088_Script_VIDEO HANDLERS
< prev
next >
Wrap
Text File
|
1996-04-01
|
3KB
|
107 lines
-- -----------------------------------------------------------
-- Handler waitMovie calls waitVideo.
on waitMovie whichSprite
waitVideo whichSprite
end
-- -----------------------------------------------------------
-- Handler freezeDigitalVideo stops playing a video that is
-- playing in channels 19 or 18.
on freezeDigitalVideo
if (the castNum of sprite 19 > 0) then
if (the castType of cast the name of cast the castNum of sprite 19 = #digitalVideo) then
set whichSprite = 19
end if
else if (the castNum of sprite 18 > 0) then
if (the castType of cast the name of cast the castNum of sprite 18 = #digitalVideo) then
set whichSprite = 18
end if
else
set whichSprite = 0
end if
if (whichSprite > 0) then
set the movieRate of sprite whichSprite = 0
end if
end
-- -----------------------------------------------------------
-- Handler unfreezeDigitalVideo starts playing a video that is
-- playing in channels 19 or 18.
on unfreezeDigitalVideo
if (the castNum of sprite 19 > 0) then
if (the castType of cast the name of cast the castNum of sprite 19 = #digitalVideo) then
set whichSprite = 19
end if
else if (the castNum of sprite 18 > 0) then
if (the castType of cast the name of cast the castNum of sprite 18 = #digitalVideo) then
set whichSprite = 18
end if
else
set whichSprite = 0
end if
if (whichSprite > 0) then
set the movieRate of sprite whichSprite = 1
end if
end
-- -----------------------------------------------------------
-- Handler setVideoMovieRate sets the movierate of the digital
-- video in the given sprite to the given rate.
on setVideoMovieRate whichSprite, theRate
set the movieRate of sprite whichSprite = theRate
end
-- -----------------------------------------------------------
-- Handler clearDigitalVideo removes from the stage a video that
-- is in channels 19 or 18.
on clearDigitalVideo
if NOT (the machineType = 256) then exit -- to fix QT 2.1 offstage prob on Mac.
if (the castNum of sprite 19 > 0) then
if (the castType of cast the name of cast the castNum of sprite 19 = #digitalVideo) then
set whichSprite = 19
end if
else if (the castNum of sprite 18 > 0) then
if (the castType of cast the name of cast the castNum of sprite 18 = #digitalVideo) then
set whichSprite = 18
end if
else
set whichSprite = 0
end if
if (whichSprite > 0) then
set the locH of sprite whichSprite = -3000
updatestage
end if
end
-- -----------------------------------------------------------
-- Handler stopVideo stops playing the video in sprite 16
on stopVideo whichSprite
if (the type of sprite whichSprite = 16) then
set the movierate of sprite whichSprite to 0
end if
-- -----------------------------------------------------------
-- Handler waitVideo plays the video in the given sprite
-- until either the video is finished or the mouse is clicked.
on waitVideo whichSprite
set the movieTime of sprite whichSprite = 0 -- rewind to beginning
set the movieRate of sprite whichSprite = 1 -- stop video and remove from screen
repeat while (not (the mouseDown)) and (the movieRate of sprite whichSprite <> 0)
updateStage
end repeat
set the movieRate of sprite whichSprite = 0 -- stop video and remove from screen
end